<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>ListUtils (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="ListUtils (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ListUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/collections4/KeyValue.html" title="interface in org.apache.commons.collections4"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/collections4/MapIterator.html" title="interface in org.apache.commons.collections4"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/collections4/ListUtils.html" target="_top">Frames</a></li>
<li><a href="ListUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.commons.collections4</div>
<h2 title="Class ListUtils" class="title">Class ListUtils</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.commons.collections4.ListUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">ListUtils</span>
extends <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block">Provides utility methods and decorators for <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a> instances.</div>
<dl><dt><span class="strong">Since:</span></dt>
  <dd>1.0</dd>
<dt><span class="strong">Version:</span></dt>
  <dd>$Id: ListUtils.java 1540567 2013-11-10 22:19:29Z tn $</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#defaultIfNull(java.util.List, java.util.List)">defaultIfNull</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list,
             <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;defaultList)</code>
<div class="block">Returns either the passed in list, or if the list is <code>null</code>,
 the value of <code>defaultList</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#emptyIfNull(java.util.List)">emptyIfNull</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list)</code>
<div class="block">Returns an immutable empty list if the argument is <code>null</code>,
 or the argument itself otherwise.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#fixedSizeList(java.util.List)">fixedSizeList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list)</code>
<div class="block">Returns a fixed-sized list backed by the given list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#hashCodeForList(java.util.Collection)">hashCodeForList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list)</code>
<div class="block">Generates a hash code using the algorithm specified in
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#hashCode()" title="class or interface in java.util"><code>List.hashCode()</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#indexOf(java.util.List, org.apache.commons.collections4.Predicate)">indexOf</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
       <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;E&gt;&nbsp;predicate)</code>
<div class="block">Finds the first index in the given List which matches the given predicate.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#intersection(java.util.List, java.util.List)">intersection</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
            <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</code>
<div class="block">Returns a new list containing all elements that are contained in
 both given lists.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#isEqualList(java.util.Collection, java.util.Collection)">isEqualList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list1,
           <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list2)</code>
<div class="block">Tests two lists for value-equality as per the equality contract in
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util"><code>List.equals(java.lang.Object)</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#lazyList(java.util.List, org.apache.commons.collections4.Factory)">lazyList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
        <a href="../../../../org/apache/commons/collections4/Factory.html" title="interface in org.apache.commons.collections4">Factory</a>&lt;? extends E&gt;&nbsp;factory)</code>
<div class="block">Returns a "lazy" list whose elements will be created on demand.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#longestCommonSubsequence(java.lang.CharSequence, java.lang.CharSequence)">longestCommonSubsequence</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;a,
                        <a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;b)</code>
<div class="block">Returns the longest common subsequence (LCS) of two <a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#longestCommonSubsequence(java.util.List, java.util.List)">longestCommonSubsequence</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;a,
                        <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;b)</code>
<div class="block">Returns the longest common subsequence (LCS) of two sequences (lists).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#longestCommonSubsequence(java.util.List, java.util.List, org.apache.commons.collections4.Equator)">longestCommonSubsequence</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;a,
                        <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;b,
                        <a href="../../../../org/apache/commons/collections4/Equator.html" title="interface in org.apache.commons.collections4">Equator</a>&lt;? super E&gt;&nbsp;equator)</code>
<div class="block">Returns the longest common subsequence (LCS) of two sequences (lists).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#partition(java.util.List, int)">partition</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list,
         int&nbsp;size)</code>
<div class="block">Returns consecutive <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#subList(int, int)" title="class or interface in java.util"><code>sublists</code></a> of a
 list, each of the same size (the final list may be smaller).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#predicatedList(java.util.List, org.apache.commons.collections4.Predicate)">predicatedList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
              <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;E&gt;&nbsp;predicate)</code>
<div class="block">Returns a predicated (validating) list backed by the given list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#removeAll(java.util.Collection, java.util.Collection)">removeAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;E&gt;&nbsp;collection,
         <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;remove)</code>
<div class="block">Removes the elements in <code>remove</code> from <code>collection</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#retainAll(java.util.Collection, java.util.Collection)">retainAll</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;E&gt;&nbsp;collection,
         <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;retain)</code>
<div class="block">Returns a List containing all the elements in <code>collection</code>
 that are also in <code>retain</code>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#select(java.util.Collection, org.apache.commons.collections4.Predicate)">select</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;inputCollection,
      <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super E&gt;&nbsp;predicate)</code>
<div class="block">Selects all elements from input collection which match the given
 predicate into an output list.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#selectRejected(java.util.Collection, org.apache.commons.collections4.Predicate)">selectRejected</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;inputCollection,
              <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super E&gt;&nbsp;predicate)</code>
<div class="block">Selects all elements from inputCollection which don't match the given
 predicate into an output collection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#subtract(java.util.List, java.util.List)">subtract</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list1,
        <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</code>
<div class="block">Subtracts all elements in the second list from the first list,
 placing the results in a new list.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#sum(java.util.List, java.util.List)">sum</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
   <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</code>
<div class="block">Returns the sum of the given lists.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#synchronizedList(java.util.List)">synchronizedList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list)</code>
<div class="block">Returns a synchronized list backed by the given list.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#transformedList(java.util.List, org.apache.commons.collections4.Transformer)">transformedList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
               <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super E,? extends E&gt;&nbsp;transformer)</code>
<div class="block">Returns a transformed list backed by the given list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#union(java.util.List, java.util.List)">union</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
     <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</code>
<div class="block">Returns a new list containing the second list appended to the
 first list.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static &lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/commons/collections4/ListUtils.html#unmodifiableList(java.util.List)">unmodifiableList</a></strong>(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list)</code>
<div class="block">Returns an unmodifiable list backed by the given list.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a name="emptyIfNull(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>emptyIfNull</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;emptyIfNull(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list)</pre>
<div class="block">Returns an immutable empty list if the argument is <code>null</code>,
 or the argument itself otherwise.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list, possibly <code>null</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>an empty list if the argument is <code>null</code></dd></dl>
</li>
</ul>
<a name="defaultIfNull(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>defaultIfNull</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;defaultIfNull(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list,
                        <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;defaultList)</pre>
<div class="block">Returns either the passed in list, or if the list is <code>null</code>,
 the value of <code>defaultList</code>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list, possibly <code>null</code></dd><dd><code>defaultList</code> - the returned values if list is <code>null</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>an empty list if the argument is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
<a name="intersection(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>intersection</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;intersection(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
                       <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</pre>
<div class="block">Returns a new list containing all elements that are contained in
 both given lists.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list1</code> - the first list</dd><dd><code>list2</code> - the second list</dd>
<dt><span class="strong">Returns:</span></dt><dd>the intersection of those two lists</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either list is null</dd></dl>
</li>
</ul>
<a name="subtract(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>subtract</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;subtract(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list1,
                   <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</pre>
<div class="block">Subtracts all elements in the second list from the first list,
 placing the results in a new list.
 <p>
 This differs from <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#removeAll(java.util.Collection)" title="class or interface in java.util"><code>List.removeAll(Collection)</code></a> in that
 cardinality is respected; if <Code>list1</Code> contains two
 occurrences of <Code>null</Code> and <Code>list2</Code> only
 contains one occurrence, then the returned list will still contain
 one occurrence.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list1</code> - the list to subtract from</dd><dd><code>list2</code> - the list to subtract</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new list containing the results</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either list is null</dd></dl>
</li>
</ul>
<a name="sum(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sum</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;sum(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
              <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</pre>
<div class="block">Returns the sum of the given lists.  This is their intersection
 subtracted from their union.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list1</code> - the first list</dd><dd><code>list2</code> - the second list</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new list containing the sum of those lists</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either list is null</dd></dl>
</li>
</ul>
<a name="union(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>union</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;union(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list1,
                <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list2)</pre>
<div class="block">Returns a new list containing the second list appended to the
 first list.  The <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#addAll(java.util.Collection)" title="class or interface in java.util"><code>List.addAll(Collection)</code></a> operation is
 used to append the two given lists into a new list.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list1</code> - the first list</dd><dd><code>list2</code> - the second list</dd>
<dt><span class="strong">Returns:</span></dt><dd>a new list containing the union of those lists</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either list is null</dd></dl>
</li>
</ul>
<a name="select(java.util.Collection, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>select</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;select(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;inputCollection,
                 <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super E&gt;&nbsp;predicate)</pre>
<div class="block">Selects all elements from input collection which match the given
 predicate into an output list.
 <p>
 A <code>null</code> predicate matches no elements.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>inputCollection</code> - the collection to get the input from, may not be null</dd><dd><code>predicate</code> - the predicate to use, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the elements matching the predicate (new list)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input list is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/CollectionUtils.html#select(java.lang.Iterable, org.apache.commons.collections4.Predicate)"><code>CollectionUtils.select(Iterable, Predicate)</code></a></dd></dl>
</li>
</ul>
<a name="selectRejected(java.util.Collection, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>selectRejected</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;selectRejected(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;? extends E&gt;&nbsp;inputCollection,
                         <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;? super E&gt;&nbsp;predicate)</pre>
<div class="block">Selects all elements from inputCollection which don't match the given
 predicate into an output collection.
 <p>
 If the input predicate is <code>null</code>, the result is an empty
 list.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>inputCollection</code> - the collection to get the input from, may not be null</dd><dd><code>predicate</code> - the predicate to use, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the elements <b>not</b> matching the predicate (new list)</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if the input collection is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd>
<dt><span class="strong">See Also:</span></dt><dd><a href="../../../../org/apache/commons/collections4/CollectionUtils.html#selectRejected(java.lang.Iterable, org.apache.commons.collections4.Predicate)"><code>CollectionUtils.selectRejected(Iterable, Predicate)</code></a></dd></dl>
</li>
</ul>
<a name="isEqualList(java.util.Collection, java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEqualList</h4>
<pre>public static&nbsp;boolean&nbsp;isEqualList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list1,
                  <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list2)</pre>
<div class="block">Tests two lists for value-equality as per the equality contract in
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.util"><code>List.equals(java.lang.Object)</code></a>.
 <p>
 This method is useful for implementing <code>List</code> when you cannot
 extend AbstractList. The method takes Collection instances to enable other
 collection types to use the List implementation algorithm.
 <p>
 The relevant text (slightly paraphrased as this is a static method) is:
 <blockquote>
 Compares the two list objects for equality.  Returns
 <tt>true</tt> if and only if both
 lists have the same size, and all corresponding pairs of elements in
 the two lists are <i>equal</i>.  (Two elements <tt>e1</tt> and
 <tt>e2</tt> are <i>equal</i> if <tt>(e1==null ? e2==null :
 e1.equals(e2))</tt>.)  In other words, two lists are defined to be
 equal if they contain the same elements in the same order.  This
 definition ensures that the equals method works properly across
 different implementations of the <tt>List</tt> interface.
 </blockquote>

 <b>Note:</b> The behaviour of this method is undefined if the lists are
 modified during the equals comparison.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list1</code> - the first list, may be null</dd><dd><code>list2</code> - the second list, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>whether the lists are equal by value comparison</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util"><code>List</code></a></dd></dl>
</li>
</ul>
<a name="hashCodeForList(java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCodeForList</h4>
<pre>public static&nbsp;int&nbsp;hashCodeForList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;list)</pre>
<div class="block">Generates a hash code using the algorithm specified in
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#hashCode()" title="class or interface in java.util"><code>List.hashCode()</code></a>.
 <p>
 This method is useful for implementing <code>List</code> when you cannot
 extend AbstractList. The method takes Collection instances to enable other
 collection types to use the List implementation algorithm.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to generate the hashCode for, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the hash code</dd><dt><span class="strong">See Also:</span></dt><dd><a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#hashCode()" title="class or interface in java.util"><code>List.hashCode()</code></a></dd></dl>
</li>
</ul>
<a name="retainAll(java.util.Collection, java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>retainAll</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;retainAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;E&gt;&nbsp;collection,
                    <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;retain)</pre>
<div class="block">Returns a List containing all the elements in <code>collection</code>
 that are also in <code>retain</code>. The cardinality of an element <code>e</code>
 in the returned list is the same as the cardinality of <code>e</code>
 in <code>collection</code> unless <code>retain</code> does not contain <code>e</code>, in which
 case the cardinality is zero. This method is useful if you do not wish to modify
 the collection <code>c</code> and thus cannot call <code>collection.retainAll(retain);</code>.
 <p>
 This implementation iterates over <code>collection</code>, checking each element in
 turn to see if it's contained in <code>retain</code>. If it's contained, it's added
 to the returned list. As a consequence, it is advised to use a collection type for
 <code>retain</code> that provides a fast (e.g. O(1)) implementation of
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util"><code>Collection.contains(Object)</code></a>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>collection</code> - the collection whose contents are the target of the #retailAll operation</dd><dd><code>retain</code> - the collection containing the elements to be retained in the returned collection</dd>
<dt><span class="strong">Returns:</span></dt><dd>a <code>List</code> containing all the elements of <code>c</code>
 that occur at least once in <code>retain</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either parameter is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.2</dd></dl>
</li>
</ul>
<a name="removeAll(java.util.Collection, java.util.Collection)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeAll</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;removeAll(<a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;E&gt;&nbsp;collection,
                    <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;?&gt;&nbsp;remove)</pre>
<div class="block">Removes the elements in <code>remove</code> from <code>collection</code>. That is, this
 method returns a list containing all the elements in <code>collection</code>
 that are not in <code>remove</code>. The cardinality of an element <code>e</code>
 in the returned collection is the same as the cardinality of <code>e</code>
 in <code>collection</code> unless <code>remove</code> contains <code>e</code>, in which
 case the cardinality is zero. This method is useful if you do not wish to modify
 <code>collection</code> and thus cannot call <code>collection.removeAll(remove);</code>.
 <p>
 This implementation iterates over <code>collection</code>, checking each element in
 turn to see if it's contained in <code>remove</code>. If it's not contained, it's added
 to the returned list. As a consequence, it is advised to use a collection type for
 <code>remove</code> that provides a fast (e.g. O(1)) implementation of
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collection.html?is-external=true#contains(java.lang.Object)" title="class or interface in java.util"><code>Collection.contains(Object)</code></a>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>collection</code> - the collection from which items are removed (in the returned collection)</dd><dd><code>remove</code> - the items to be removed from the returned <code>collection</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>a <code>List</code> containing all the elements of <code>c</code> except
 any elements that also occur in <code>remove</code>.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - if either parameter is null</dd><dt><span class="strong">Since:</span></dt>
  <dd>3.2</dd></dl>
</li>
</ul>
<a name="synchronizedList(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>synchronizedList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;synchronizedList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list)</pre>
<div class="block">Returns a synchronized list backed by the given list.
 <p>
 You must manually synchronize on the returned list's iterator to
 avoid non-deterministic behavior:

 <pre>
 List list = ListUtils.synchronizedList(myList);
 synchronized (list) {
     Iterator i = list.iterator();
     while (i.hasNext()) {
         process (i.next());
     }
 }
 </pre>

 This method is just a wrapper for <a href="http://download.oracle.com/javase/6/docs/api/java/util/Collections.html?is-external=true#synchronizedList(java.util.List)" title="class or interface in java.util"><code>Collections.synchronizedList(List)</code></a>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to synchronize, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>a synchronized list backed by the given list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the list is null</dd></dl>
</li>
</ul>
<a name="unmodifiableList(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unmodifiableList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;unmodifiableList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends E&gt;&nbsp;list)</pre>
<div class="block">Returns an unmodifiable list backed by the given list.
 <p>
 This method uses the implementation in the decorators subpackage.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to make unmodifiable, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>an unmodifiable list backed by the given list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the list is null</dd></dl>
</li>
</ul>
<a name="predicatedList(java.util.List, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>predicatedList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;predicatedList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
                         <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;E&gt;&nbsp;predicate)</pre>
<div class="block">Returns a predicated (validating) list backed by the given list.
 <p>
 Only objects that pass the test in the given predicate can be added to the list.
 Trying to add an invalid object results in an IllegalArgumentException.
 It is important not to use the original list after invoking this method,
 as it is a backdoor for adding invalid objects.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to predicate, must not be null</dd><dd><code>predicate</code> - the predicate for the list, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>a predicated list backed by the given list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the List or Predicate is null</dd></dl>
</li>
</ul>
<a name="transformedList(java.util.List, org.apache.commons.collections4.Transformer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>transformedList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;transformedList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
                          <a href="../../../../org/apache/commons/collections4/Transformer.html" title="interface in org.apache.commons.collections4">Transformer</a>&lt;? super E,? extends E&gt;&nbsp;transformer)</pre>
<div class="block">Returns a transformed list backed by the given list.
 <p>
 This method returns a new list (decorating the specified list) that
 will transform any new entries added to it.
 Existing entries in the specified list will not be transformed.
 <p>
 Each object is passed through the transformer as it is added to the
 List. It is important not to use the original list after invoking this
 method, as it is a backdoor for adding untransformed objects.
 <p>
 Existing entries in the specified list will not be transformed.
 If you want that behaviour, see <a href="../../../../org/apache/commons/collections4/list/TransformedList.html#transformedList(java.util.List, org.apache.commons.collections4.Transformer)"><code>TransformedList.transformedList(java.util.List&lt;E&gt;, org.apache.commons.collections4.Transformer&lt;? super E, ? extends E&gt;)</code></a>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to predicate, must not be null</dd><dd><code>transformer</code> - the transformer for the list, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>a transformed list backed by the given list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the List or Transformer is null</dd></dl>
</li>
</ul>
<a name="lazyList(java.util.List, org.apache.commons.collections4.Factory)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>lazyList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;lazyList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
                   <a href="../../../../org/apache/commons/collections4/Factory.html" title="interface in org.apache.commons.collections4">Factory</a>&lt;? extends E&gt;&nbsp;factory)</pre>
<div class="block">Returns a "lazy" list whose elements will be created on demand.
 <p>
 When the index passed to the returned list's <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#get(int)" title="class or interface in java.util"><code>get</code></a>
 method is greater than the list's size, then the factory will be used
 to create a new object and that object will be inserted at that index.
 <p>
 For instance:

 <pre>
 Factory&lt;Date&gt; factory = new Factory&lt;Date&gt;() {
     public Date create() {
         return new Date();
     }
 }
 List&lt;Date&gt; lazy = ListUtils.lazyList(new ArrayList&lt;Date&gt;(), factory);
 Date date = lazy.get(3);
 </pre>

 After the above code is executed, <code>date</code> will refer to
 a new <code>Date</code> instance.  Furthermore, that <code>Date</code>
 instance is the fourth element in the list.  The first, second,
 and third element are all set to <code>null</code>.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to make lazy, must not be null</dd><dd><code>factory</code> - the factory for creating new objects, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>a lazy list backed by the given list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the List or Factory is null</dd></dl>
</li>
</ul>
<a name="fixedSizeList(java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>fixedSizeList</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;fixedSizeList(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list)</pre>
<div class="block">Returns a fixed-sized list backed by the given list.
 Elements may not be added or removed from the returned list, but
 existing elements can be changed (for instance, via the
 <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#set(int, E)" title="class or interface in java.util"><code>List.set(int, Object)</code></a> method).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list whose size to fix, must not be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>a fixed-size list backed by that list</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if the List is null</dd></dl>
</li>
</ul>
<a name="indexOf(java.util.List, org.apache.commons.collections4.Predicate)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>indexOf</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;int&nbsp;indexOf(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;list,
              <a href="../../../../org/apache/commons/collections4/Predicate.html" title="interface in org.apache.commons.collections4">Predicate</a>&lt;E&gt;&nbsp;predicate)</pre>
<div class="block">Finds the first index in the given List which matches the given predicate.
 <p>
 If the input List or predicate is null, or no element of the List
 matches the predicate, -1 is returned.</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the List to search, may be null</dd><dd><code>predicate</code> - the predicate to use, may be null</dd>
<dt><span class="strong">Returns:</span></dt><dd>the first index of an Object in the List which matches the predicate or -1 if none could be found</dd></dl>
</li>
</ul>
<a name="longestCommonSubsequence(java.util.List, java.util.List)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longestCommonSubsequence</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;longestCommonSubsequence(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;a,
                                   <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;b)</pre>
<div class="block">Returns the longest common subsequence (LCS) of two sequences (lists).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - the first list</dd><dd><code>b</code> - the second list</dd>
<dt><span class="strong">Returns:</span></dt><dd>the longest common subsequence</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either list is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
<a name="longestCommonSubsequence(java.util.List, java.util.List, org.apache.commons.collections4.Equator)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longestCommonSubsequence</h4>
<pre>public static&nbsp;&lt;E&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;longestCommonSubsequence(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;a,
                                   <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;E&gt;&nbsp;b,
                                   <a href="../../../../org/apache/commons/collections4/Equator.html" title="interface in org.apache.commons.collections4">Equator</a>&lt;? super E&gt;&nbsp;equator)</pre>
<div class="block">Returns the longest common subsequence (LCS) of two sequences (lists).</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>E</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - the first list</dd><dd><code>b</code> - the second list</dd><dd><code>equator</code> - the equator used to test object equality</dd>
<dt><span class="strong">Returns:</span></dt><dd>the longest common subsequence</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either list or the equator is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
<a name="longestCommonSubsequence(java.lang.CharSequence, java.lang.CharSequence)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>longestCommonSubsequence</h4>
<pre>public static&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;longestCommonSubsequence(<a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;a,
                              <a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</a>&nbsp;b)</pre>
<div class="block">Returns the longest common subsequence (LCS) of two <a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> objects.
 <p>
 This is a convenience method for using <a href="../../../../org/apache/commons/collections4/ListUtils.html#longestCommonSubsequence(java.util.List, java.util.List)"><code>longestCommonSubsequence(List, List)</code></a>
 with <a href="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang"><code>CharSequence</code></a> instances.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>a</code> - the first sequence</dd><dd><code>b</code> - the second sequence</dd>
<dt><span class="strong">Returns:</span></dt><dd>the longest common subsequence as <a href="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a></dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if either sequence is <code>null</code></dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
<a name="partition(java.util.List, int)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>partition</h4>
<pre>public static&nbsp;&lt;T&gt;&nbsp;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&gt;&nbsp;partition(<a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;T&gt;&nbsp;list,
                          int&nbsp;size)</pre>
<div class="block">Returns consecutive <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#subList(int, int)" title="class or interface in java.util"><code>sublists</code></a> of a
 list, each of the same size (the final list may be smaller). For example,
 partitioning a list containing <code>[a, b, c, d, e]</code> with a partition
 size of 3 yields <code>[[a, b, c], [d, e]]</code> -- an outer list containing
 two inner lists of three and two elements, all in the original order.
 <p>
 The outer list is unmodifiable, but reflects the latest state of the
 source list. The inner lists are sublist views of the original list,
 produced on demand using <a href="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true#subList(int, int)" title="class or interface in java.util"><code>List.subList(int, int)</code></a>, and are subject
 to all the usual caveats about modification as explained in that API.
 <p>
 Adapted from http://code.google.com/p/guava-libraries/</div>
<dl><dt><span class="strong">Type Parameters:</span></dt><dd><code>T</code> - the element type</dd><dt><span class="strong">Parameters:</span></dt><dd><code>list</code> - the list to return consecutive sublists of</dd><dd><code>size</code> - the desired size of each sublist (the last may be smaller)</dd>
<dt><span class="strong">Returns:</span></dt><dd>a list of consecutive sublists</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - if list is <code>null</code> or size is not strictly positive</dd><dt><span class="strong">Since:</span></dt>
  <dd>4.0</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/ListUtils.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/commons/collections4/KeyValue.html" title="interface in org.apache.commons.collections4"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/commons/collections4/MapIterator.html" title="interface in org.apache.commons.collections4"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/commons/collections4/ListUtils.html" target="_top">Frames</a></li>
<li><a href="ListUtils.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
